Various apparatus and methods for optically recognizing characters, including bar codes, have existed for many years. This invention concerns recognition of a bar code comprising a two-dimensional set of vertical bars of predetermined lengths that are nominally spaced at predetermined horizontal intervals. The space occupied by one bar plus the space between the adjacent bar is referred to as the bar pitch, and it is typically fixed. An example of such a bar code is disclosed in U.S. Pat. No. 4,408,121, which is incorporated herein by reference.
The bar code is "read" or deciphered by an optical scanner which converts the optical information, i.e. picture elements or Pels, into electrical data pulses that may be processed by a computer or the like. Since the two dimension bar code is particularly useful in marking bank checks, it is desirable to be able to read the code at high speed using typical bank check data processing equipment. However, the accuracy of high speed reading may be compromised due to irregularities in either the bar code itself or the equipment used to scan the bar code or both. For example, bar code errors may include irregular horizontal spacing between vertical bars, top to bottom skew, tilt, partial obliteration of one or more bars, and other stray marks in the vicinity of the bar.
The equipment used to decipher the bar code typically transports the document bearing the code, such as a bank check, through a field monitored by a scanner that discriminates between the individual bars and a contrasting background to generate scan lines of elements of image data representing either a bar image Pel or a space image Pel. The document usually passes through the scanner field at a high rate of speed that is coordinated to the rate at which the scanner generates the lines of image data and to the fixed bar pitch or the width of the spaces between the individual adjacent bars. Problems arise when documents move through the scanner field at different velocities, with a skewed orientation, or at a nonconstant velocity. This causes the bar code to be out of alignment with the scanner field, and the scanner may sense a nonconstant pitch, inducing errors.